home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld Secrets (4th Edition)
/
Mac Secrets CD 4th Ed.toast
/
Icon, Sound, Graphics Samplers
/
Olduvai Fonts & Sounds
/
Olduvai Sounds
/
Sound Clips™ Online Manual
/
Sound Clips™ Online Manual.rsrc
/
TEXT_137.txt
< prev
next >
Wrap
Text File
|
1994-09-23
|
620b
|
16 lines
Appendix
There is a Macintosh Toolbox function to play sounds that any programmer can use in high level programming languages like Pascal and C.
This function, as described in Inside Macintosh, is SndPlay and the correct syntax is:
Function SndPlay (chan:SndChannelPtr; sndHdl: Handle; async:BOOLEAN)
An example use in MPW Pascal could be:
sdhndl:=GetNamedResource(‘snd ‘,Sdname);
err:=SndPlay(nil,sdhndl,async);
This function plays the ‘snd ‘ resource as specified by the name of the sound. Use ResCopy to get the resource name and ID number.
Refer to Inside Macintosh Volume 5, The Sound Manager.